package com.bosssoft.trainee.nontax.service;

import com.bosssoft.trainee.nontax.config.ConfigBean;
import com.bosssoft.trainee.nontax.entity.vo.query.DepartmentQueryVO;
import com.bosssoft.trainee.nontax.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @program:springcloud-rbac-system
 * @author: sct
 * @Time: 2022/7/12  21:04
 * @description:
 */

//添加为容器内的一个组件
@Component
// 服务提供者提供的服务名称，即 application.name
@FeignClient(value = "RBAC",configuration={ConfigBean.class})
public interface FeignService {
    @RequestMapping(value = "/api/permission/{id}",method = RequestMethod.GET)
    public Result<Object> list(@PathVariable Long id);

    @RequestMapping(value = "/api/department/parent/list", method = RequestMethod.GET)
    public Result<Object> getParentDepartment();

    @RequestMapping(value = "/api/role/check/{id}",method = RequestMethod.GET)
    public Result<Object> rolecheck(@PathVariable Long id);

    @RequestMapping(value = "/api/role/delete/{id}",method = RequestMethod.DELETE)
    public Result<Object> delete(@PathVariable Long id);

    @RequestMapping(value = "/api/department/check/{id}", method = RequestMethod.GET)
    public Result<Object> check(@PathVariable Long id);
}
